package org.rugby.online.impl;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;
import org.rugby.online.core.economy.RboTransferType;
import org.rugby.online.impl.DefaultTransferDescription;

public class DefaultTransferDescriptionTest {

	private DefaultTransferDescription description;
	
	private static final long TEST_SOURCE_ID = 1L;
	private static final long TEST_TARGET_ID = 2L;
	private static final int TEST_AMOUNT = 125;
	private static final int TEST_SEASON = 2;
	private static final RboTransferType TEST_TYPE = RboTransferType.INCOME_SEASONLY;
	private static final String TEST_NAME = "TEST NAME";
	
	@Before
	public void setUp() throws Exception {
		description = new DefaultTransferDescription(TEST_SOURCE_ID, TEST_TARGET_ID, TEST_AMOUNT, TEST_SEASON, TEST_TYPE);
		description.setName(TEST_NAME);
	}

	@Test
	public void testGetSourceId() {
		assertTrue(description.getSourceId() == TEST_SOURCE_ID);
	}

	@Test
	public void testGetTargerId() {
		assertTrue(description.getTargetId() == TEST_TARGET_ID);
	}

	@Test
	public void testGetAmount() {
		assertTrue(description.getAmount() == TEST_AMOUNT);
	}

	@Test
	public void testGetTransferType() {
		assertTrue(description.getTransferType() == TEST_TYPE);
	}

	@Test
	public void testGetSeason() {
		assertTrue(description.getSeason() == TEST_SEASON);
	}

	@Test
	public void testGetName() {
		assertTrue(description.getName().equals(TEST_NAME));
	}

	@Test
	public void testGetId() {
		assertNotNull(description.getId());
	}

}
